<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<style type="text/css">
.dateWidth1{
   width:195px;
}
.select_width{
   width:130px;
}
</style>
<x:parse xml="${param.xmlstr}" var="xmlData" />

<table class="t_css" width="100%" border="0" cellpadding="0" id="basicInfo"
	cellspacing="1">
	<tr>
		<td   colspan="6" class="t_bar2">基本信息</td>
		
	</tr>
	<tr>
		<td   align="right"><span class="color_red">*</span>项目名称：</td>
		<td  colspan="5">
			<input id="zh_title" name="proposal/zh_title" label="项目名称" type="text" required class="input_css required maxlength:100"  style="width: 725px;" maxlength="100" value="<x:out select="$xmlData/data/proposal/zh_title" />"/> 
		</td>
	</tr>
	<tr>
		<td align="right"><span class="color_red">*</span>项目性质：</td>
		<td nowrap  colspan="5" valign="middle">
		<label> <input type="radio" class="do " id="advant_01" style="vertical-align: middle;" name="prjnature" label="新建" value="01" /><span style="vertical-align: middle;">新建</span></label> 
		<label> <input type="radio" class="do " id="advant_02" style="vertical-align: middle;" name="prjnature" label="续建" value="02" /><span style="vertical-align: middle;">续建</span></label> 
		<label> <input type="radio" class="do " id="advant_03" style="vertical-align: middle;" name="prjnature" label="扩建" value="03" /><span style="vertical-align: middle;">扩建</span></label>
		<input type="hidden" name="proposal/prjnature_value" id="prjnature_value" class="required" value="<x:out select="$xmlData/data/proposal/prjnature_value" />" label="项目性质" /> 
		<input type="hidden" name="proposal/prjnature_name" id="prjnature_name" value="<x:out select="$xmlData/data/proposal/prjnature_name" />" label="项目性质" /></td>
	</tr>
	<tr>
	    <td  align="right"><span class="color_red">*</span>项目核准或备案文号：</td>
		<td colspan="2"><input name="proposal/project_approval" label="项目核准或备案文号" type="text"  class="input_css required "  maxlength="50" value="<x:out select="$xmlData/data/proposal/project_approval" />"/></td>
		<td  align="right" nowrap><span class="color_red">*</span>项目核准或备案时间：</td>
		<td colspan="2">
			<c:set var="approval_date"><x:out select="$xmlData/data/proposal/approval_date" /></c:set>
			<cpt:date id="approval_date" name="proposal/approval_date" value="${approval_date}" className=" required date" label="项目核准或备案时间"></cpt:date> 
		</td>
	</tr>
	<tr>
	<td align="right"><span class="color_red">*</span>项目实施地点：</td>
	<td nowrap colspan="5">
		<c:set var="address_value"><x:out select="$xmlData/data/proposal/address_value" /></c:set>
		<cpt:checkbox key="address" name="address" repeatColumn="5" style="border: 0px; padding: 0px; margin: 0px;float:left;"></cpt:checkbox>
		<input type="hidden" id="address_value" name="proposal/address_value" class="required" value="${address_value}" label="项目实施地点">
		<input type="hidden" name="proposal/address_name" value="<x:out select="$xmlData/data/proposal/address_name" />">
	</td>
	</tr>
	<tr>
	<td align="right"><span class="color_red">*</span>起止时间：</td>
	<td nowrap colspan="5">
	<c:set var="start_date"><x:out select="$xmlData/data/proposal/start_date" /></c:set>
	<cpt:date id="start_date" name="proposal/start_date" value="${start_date}" className="required date  dateCompare:end_date" label="项目开始日期" ></cpt:date>至
	<c:set var="end_date"><x:out select="$xmlData/data/proposal/end_date" /></c:set>
	<cpt:date id="end_date" name="proposal/end_date" className="required date" label="项目结束日期"  value="${end_date}" ></cpt:date>		
	</tr>
	<tr>
	<td align="right">项目投资单位：</td>
	<td nowrap colspan="5">
	<x:out select="$xmlData/data/organizations/organization[@submit_org='1']/org_name" />
	</tr>
	<tr>
	<td align="right">主承建单位：</td>
	<td nowrap colspan="5">
	<span id="zcddw"></span>
	</tr>
	<tr>
	<td align="right"><span class="color_red">*</span>合作单位（最多6个，以;隔开）：</td>
	<td nowrap colspan="5">
	<input name="proposal/collaborate_org" label="合作单位" type="text" required class="input_css required "  style="width: 725px;" maxlength="100" value="<x:out select="$xmlData/data/proposal/collaborate_org" />"/>
	</tr>
	<tr>
		<td align="right"><span class="color_red">*</span>项目所属领域：</td>
		<td nowrap  colspan="5" valign="middle">
		<label> <input type="radio" class="do " id="advant_01" style="vertical-align: middle;" name="prjfield" label="智慧工业" value="01" /><span style="vertical-align: middle;">智慧工业</span></label> 
		<label> <input type="radio" class="do " id="advant_02" style="vertical-align: middle;" name="prjfield" label="智慧农业" value="02" /><span style="vertical-align: middle;">智慧农业</span></label> 
		<label> <input type="radio" class="do " id="advant_03" style="vertical-align: middle;" name="prjfield" label="智慧电力" value="03" /><span style="vertical-align: middle;">智慧电力</span></label>
		<label> <input type="radio" class="do " id="advant_04" style="vertical-align: middle;" name="prjfield" label="智慧物流" value="04" /><span style="vertical-align: middle;">智慧物流</span></label>
		<label> <input type="radio" class="do " id="advant_05" style="vertical-align: middle;" name="prjfield" label="智慧交通" value="05" /><span style="vertical-align: middle;">智慧交通</span></label>
		<label> <input type="radio" class="do " id="advant_06" style="vertical-align: middle;" name="prjfield" label="智慧安防" value="06" /><span style="vertical-align: middle;">智慧安防</span></label>
		<label> <input type="radio" class="do " id="advant_07" style="vertical-align: middle;" name="prjfield" label="智慧环保" value="07" /><span style="vertical-align: middle;">智慧环保</span></label><br/>
		<label> <input type="radio" class="do " id="advant_08" style="vertical-align: middle;" name="prjfield" label="智慧医疗" value="08" /><span style="vertical-align: middle;">智慧医疗</span></label>
		<label> <input type="radio" class="do " id="advant_09" style="vertical-align: middle;" name="prjfield" label="智慧家居" value="09" /><span style="vertical-align: middle;">智慧家居</span></label>
		<label> <input type="radio" class="do " id="advant_10" style="vertical-align: middle;" name="prjfield" label="智慧水利" value="10" /><span style="vertical-align: middle;">智慧水利</span></label>
		<label> <input type="radio" class="do " id="advant_11" style="vertical-align: middle;" name="prjfield" label="智慧教育" value="11" /><span style="vertical-align: middle;">智慧教育</span></label>
<!-- 		<label> <input type="radio" class="do " id="advant_03" style="vertical-align: middle;" name="prjfield" label="智慧水利" value="12" /><span style="vertical-align: middle;">智慧水利</span></label>
 -->		<label> <input type="radio" class="do " id="advant_12" style="vertical-align: middle;" name="prjfield" label="地区综合" value="12" /><span style="vertical-align: middle;">地区综合</span></label>
		<label> <input type="radio" class="do " id="advant_13" style="vertical-align: middle;" name="prjfield" label="其他" value="13" /><span style="vertical-align: middle;">其他</span></label>
		<input type="hidden" name="proposal/prjfield_value" id="prjfield_value" class="required" value="<x:out select="$xmlData/data/proposal/prjfield_value" />" label="项目所属领域" /> 
		<input type="hidden" name="proposal/prjfield_name" id="prjfield_name" value="<x:out select="$xmlData/data/proposal/prjfield_name" />" label="项目所属领域" /></td>
	</tr>
	<tr>
	    <td  align="right" nowrap><span class="color_red">*</span>申报日期：</td>
		<td colspan="5">
			<c:set var="submit_date"><x:out select="$xmlData/data/proposal/submit_date" /></c:set>
			<cpt:date id="submit_date" name="proposal/submit_date" value="${submit_date}" className=" required date" label="申报日期"></cpt:date> 
		</td>
	</tr>
	
	<tr>
		<td   colspan="6" class="t_bar2">申报项目资金情况(单位：万元)</td>
		
	</tr>
	<tr>
	<td   align="right" rowspan="2" nowrap>项目计划投资总额：</td>
	<td  rowspan="2">
	<input  name="proposal/xmjhtzze" id="xmjhtzze" disabled  label="项目计划投资总额" type="text"  class="input_css  gray" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" value="<x:out select="$xmlData/data/proposal/xmjhtzze" />"/> 
	</td>
	<td  align="right" nowrap>其中：已投资额：</td>
	<td  >
	<input  name="proposal/ytrzj" id="ytrzj" class="gray " disabled label="其中：已投资额" type="text"  class="input_css " style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" value="<x:out select="$xmlData/data/proposal/ytrzj" />"/> 
	</td>
	<td  align="right" nowrap>计划新增投入资金：</td>
	<td  colspan="1">
	<input  name="proposal/jhxztrzj" id="jhxztrzj" disabled  label="计划新增投入资金" type="text"  class="input_css  gray" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" value="<x:out select="$xmlData/data/proposal/jhxztrzj" />"/> 
	</td>
	</tr>
	<tr>
	<td  align="right" nowrap>其中：设备购置额：</td>
	<td  >
	<input  name="proposal/sbgze" id="sbgze" class="gray " disabled label="其中：设备购置额" type="text"  class="input_css " style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" value="<x:out select="$xmlData/data/proposal/sbgze" />"/> 
	</td>
	<td  align="right" nowrap>其中：本地设备采购额：</td>
	<td  colspan="1">
	<input  name="proposal/bdsbcge" id="bdsbcge" disabled  label="其中：本地设备采购额" type="text"  class="input_css  gray" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" value="<x:out select="$xmlData/data/proposal/bdsbcge" />"/> 
	</td>
	</tr>
	<tr>
		<td  align="right"  >项目类别：</td>
		<td  colspan="2"><x:out select="$xmlData/data/proposal/grant_name" /></td> 
		<td  align="right">支持方式：</td>
		<td  colspan="2">
			<span name="proposal/sponsor_category"><x:out select="$xmlData/data/proposal/sponsor_category" /></span> 
		</td>
	</tr>
	<tr>
	<td  align="right">申请金额：</td>
	<td  colspan="2">
	  <input  name="proposal/sqje" id="sqje" class="gray " disabled label="申请金额" type="text"  class="input_css " style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" value="<x:out select="$xmlData/data/proposal/sqje" />"/> 
	</td>
	<td align="right">资金级次：</td>
	<td colspan="2">
		<span  name="proposal/fund_level">市级</span>
	</td>
	</tr>
	<tr>
	    <td  align="right" nowrap>归口管理部门：</td>
		<td  colspan="2"><span name="proposal/org_name">无锡市经济和信息化委员会</span> </td>
	    <td  align="right">管理类别：</td>
		<td  colspan="2">
		<span name="proposal/manage_category"><x:out select="$xmlData/data/proposal/manage_category" /></span>
		</td>
	</tr>
	<tr>
		<td  align="right" nowrap><span class="color_red">*</span>项目所属产业：</td>
		<td nowrap colspan="5">
			<c:set var="industry"><x:out select="$xmlData/data/proposal/industry_value" /></c:set>
			<cpt:checkbox key="industry" name="industry" repeatColumn="5" style="border: 0px; padding: 0px; margin: 0px;float:left;"></cpt:checkbox>
			<input type="hidden" id="industry_value" name="proposal/industry_value" class="required" value="${industry}" label="项目所属产业">
			<input type="hidden" name="proposal/industry_name" value="<x:out select="$xmlData/data/proposal/industry_name" />">
		</td>
	</tr>
	<tr>
	    <td  align="right">功能分类：</td>
		<td  colspan="5">
		<span name="proposal/grant_function"><x:out select="$xmlData/data/proposal/grant_function" /></span>
		</td>
		
	</tr>
	</table>
	<table  width="100%" border="0" cellpadding="0" cellspacing="1">
	<tr>
		<td    class="t_bar2">申请资助依据条款</td>
		
	</tr>
	<tr>
		<td >
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<span name="proposal/policy_foundation"><x:out select="$xmlData/data/proposal/policy_foundation" /></span> 
		</td>
	</tr>
</table>
<br/>
<div class="t_bar2"><span class="color_red">*</span>合作单位基本情况</div>
<table class="t_css" width="100%" border="0" cellpadding="0" cellspacing="1" id="tblPurchases">
   <thead >
	<tr name="externTr">
	   	<th class="TblHead" align="center"  width="5%">选择</th>
		<th class="TblHead" align="center"  width="5%">序号</th>
		<th class="TblHead" align="center" width="90%" >合作单位基本情况</th>
	</tr>
	</thead>
			<tbody id="tab">
					<tr style="display:none" align="center" name="externTr">
						<td align="center">&nbsp;<input type="radio" class="radiobutton" name="selPurchases" ></td>
						<td align="center">&nbsp;<span name="purchases|purchase[0]@seq_no" >[index]</span></td>
						<td>
						<table cellpadding="0" class="table01" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
						<tr>
				           <td align="right">单位名称：</td>
				           <td colspan="3" align="left"><input name="purchases|purchase[0]|org_name" label="单位名称" type="text"  class="input_css required" style="width: 650px;" maxlength="100" value="" /></td>
		                </tr>
						<tr>
							<td align="right">单位地址：</td>
							<td align="left"><input name="purchases|purchase[0]|address" label="单位地址" type="text" required class="input_css required"  maxlength="100" value="" /></td>
							<td align="right">单位资质：</td>
							<td align="left"><input name="purchases|purchase[0]|org_aptitude" label="单位资质" type="text" required class="input_css required"  maxlength="100" value="" /></td>
						
						</tr>
						<tr>
							<td width="14%" align="right">注册类型：</td>
							<td width="38%" align="left" colspan="1" align="left">
							 <cpt:tree key="nature_type" cacheable="false" className="hn_iuput_kuang gray" readonly="true" value="${nature}" label="注册类型"
							  id="nature[index]" showPattern="current" shieldPattern="0" topCheckbox="false" onClick="initTreeValue" /> 
							 <input type="hidden" id="nature[index]_code" name="purchases|purchase[0]|nature_code" class="required" label="注册类型" value="" /> 
							<input type="hidden" id="nature[index]_name" name="purchases|purchase[0]|nature_name" value="" /></td>
							<td align="right">组织机构代码：</td>
							<td align="left"><input name="purchases|purchase[0]|org_no" label="组织机构代码" type="text" class="input_css orgCard required" maxlength="20" value="" /></td>
						</tr>
						<tr>
							<td align="right" nowrap>承担任务：</td>
							<td align="left">
							<input name="purchases|purchase[0]|task" label="承担任务" type="text" class="input_css required"  maxlength="50" value="" /></td>
							<td align="right" nowrap>工作量占比%：</td>
							<td align="left"><input name="purchases|purchase[0]|money_pre" label="工作量占比" type="text" class="input_css required" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" maxlength="20" value="" /></td>
						</tr>
						<tr>
							<td align="right">联系人：</td>
							<td align="left">
							<input name="purchases|purchase[0]|lxr_name" label="联系人姓名" type="text" class="input_css required" maxlength="20" value="" /></td>
							<td align="right">电话：</td>
							<td align="left"><input name="purchases|purchase[0]|lxr_tel" label="联系人电话" type="text" class="input_css required" maxlength="20" value="" /></td>
						</tr>
						</table>
						</td>
					</tr>
					
					<c:set value="0" var="index" scope="page"/>
					<x:forEach select="$xmlData/data/purchases/purchase" var="purchase">
					
					<c:choose>
						<c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
						<c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
					</c:choose>
					<tr align="center" name="externTr">
						<td align="center">&nbsp;<input type="radio" class="radiobutton" name="selPurchases" ></td>
						<td align="center">&nbsp;<span name="purchases/purchase[${flag}${index}]@seq_no" ><x:out select="$purchase/@seq_no"/></span></td>
						<td>
						<table cellpadding="0" class="table01" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
						<tr>
				           <td align="right">单位名称：</td>
				           <td colspan="3" align="left"><input name="purchases/purchase[${flag}${index}]/org_name" label="单位名称" type="text"  class="input_css required" style="width: 650px;" maxlength="100" value="<x:out select="$purchase/org_name" />" /></td>
		                </tr>
						<tr>
							<td align="right">单位地址：</td>
							<td align="left"><input name="purchases/purchase[${flag}${index}]/address" label="单位地址" type="text" required class="input_css required"  maxlength="100" value="<x:out select="$purchase/address" />" /></td>
							<td align="right">单位资质：</td>
							<td align="left"><input name="purchases/purchase[${flag}${index}]/org_aptitude" label="单位资质" type="text" required class="input_css required"  maxlength="100" value="<x:out select="$purchase/org_aptitude" />" /></td>
						</tr>
						<tr>
							<td width="14%" align="right">注册类型：</td>
							<td width="38%" align="left" colspan="1" >
							<c:set var="nature">{'id':'<x:out select="$purchase/nature_code" />','name':'<x:out select="$purchase/nature_name" />'}</c:set>
							 <cpt:tree key="nature_type" cacheable="false" className="hn_iuput_kuang gray" readonly="true" value="${nature}" label="注册类型"
							  id="nature${flag}${index}"  showPattern="current" shieldPattern="0" topCheckbox="false" onClick="initTreeValue" /> 
							 <input type="hidden" id="nature${flag}${index}_code" name="purchases/purchase[${flag}${index}]/nature_code" class="required" label="注册类型" value="<x:out select="$purchase/nature_code" />" /> 
							<input type="hidden" id="nature${flag}${index}_name" name="purchases/purchase[${flag}${index}]/nature_name" value="<x:out select="$purchase/nature_name" />" /></td>
							<td align="right">组织机构代码：</td>
							<td align="left"><input name="purchases/purchase[${flag}${index}]/org_no" label="组织机构代码" type="text" class="input_css orgCard required" maxlength="20" value="<x:out select="$purchase/org_no" />" /></td>
						</tr>
						<tr>
							<td align="right" nowrap>承担任务：</td>
							<td align="left">
							<input name="purchases/purchase[${flag}${index}]/task" label="承担任务" type="text" class="input_css required"  maxlength="50" value="<x:out select="$purchase/task" />" /></td>
							<td align="right" nowrap>工作量占比%：</td>
							<td align="left"><input name="purchases/purchase[${flag}${index}]/money_pre" label="工作量占比" type="text" class="input_css required"  style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" maxlength="20" value="<x:out select="$purchase/money_pre" />" /></td>
						</tr>
						<tr>
							<td align="right">联系人：</td>
							<td align="left">
							<input name="purchases/purchase[${flag}${index}]/lxr_name" label="联系人姓名" type="text" class="input_css required" maxlength="20" value="<x:out select="$purchase/lxr_name" />" /></td>
							<td align="right">电话：</td>
							<td align="left"><input name="purchases/purchase[${flag}${index}]/lxr_tel" label="联系人电话" type="text" class="input_css required" maxlength="20" value="<x:out select="$purchase/lxr_tel" />" /></td>
						</tr>
						</table>
						</td>
					</tr>
					<c:set value="${index+1}" var="index" scope="page"/>
					</x:forEach>
				</tbody>
					</table>
					<table width="98%" align="center">
					<tr ><td>
					<input class="button" name="cmdAddbefore" type=button value="添加" onclick="if(checkTabLimit('tblPurchases',99,'合作单位基本情况最多只能填写99条')){addNewRow('tblPurchases');showDateTag('tblPurchases');}try{top.resizeFrame();}catch(e){};">
					<input class="button" name="cmdMovePrev" type=button value="上移" onclick="movePrev('tblPurchases','selPurchases')">
					<input class="button" name="cmdMoveNext" type=button value="下移" onclick="moveNext('tblPurchases','selPurchases')">
					<input class="button" name="cmddel" type=button  value="删除" onclick="deleteSelectedRow('tblPurchases','合作单位基本情况');">
					</td></tr>
					</table>	

<br/>
<table class="t_css" width="100%" border="0" cellpadding="0" id="basicInfo1"
	cellspacing="1">
	<tr>
		<td class="t_bar2" colspan="8">人员信息</td>
		
	</tr>
<tr>
		<td  align="right"><span class="color_red">*</span>项目联系人：</td>
		<td  >
			<input  name="proposal/contact_psn_cname" label="项目联系人" type="text" required class="input_css required"   maxlength="20" value="<x:out select="$xmlData/data/proposal/contact_psn_cname" />"/> 
		</td>
		<td  align="right"><span class="color_red">*</span>联系电话：</td>
		<td  >
			<input  name="proposal/contact_psn_tel" label="联系电话" type="text" required class="input_css required"   maxlength="20" value="<x:out select="$xmlData/data/proposal/contact_psn_tel" />"/> 
		</td>
		<td  align="right"><span class="color_red">*</span>联系手机：</td>
		<td  >
			<input  name="proposal/contact_psn_mobile" label="联系手机" type="text" required maxlength="11" required class="input_css required mobile"   maxlength="20" value="<x:out select="$xmlData/data/proposal/contact_psn_mobile" />"/> 
		</td>
		<td  align="right"><span class="color_red">*</span>电子邮箱：</td>
		<td  >
			<input  name="proposal/contact_psn_email" label="电子邮箱" type="text" required class="input_css required email"   maxlength="50" value="<x:out select="$xmlData/data/proposal/contact_psn_email" />"/> 
		</td>
	</tr>
	
	<tr>
		<td  align="right">项目负责人：</td>
		<td>
			<input  name="proposal/fzr_psncode" type="hidden" required class="input_css "   maxlength="20" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/psn_code" />"/> 
		    
		    <span name="proposal/fzr_psnname" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name" /></span>
		    <c:set var="psnCode"><x:out select="$xmlData/data/proposal/psn_code" /></c:set>
		    <security:authorize ifAnyGranted="A_DAILU_PROPOSAL">
				<span id="personSelect">
				<input type="button" class="button_02" style="height: 25px; padding: 1px;" id="selectPsn" value="设置">
				<cpt:personSelect key="personSelect"  addRole="3"  psnCode="${psnCode}" callback="selectPsnCall" bindEvent="click" bindObject="selectPsn" title="设置项目负责人" fltFile="personSelector.ftl"></cpt:personSelect>
				</span>
			</security:authorize>
		</td>
		<security:authorize ifNotGranted="A_DAILU_PROPOSAL"> 
		<td  align="right">联系电话：</td>
		<td  >
		<span name="proposal/fzr_tel"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work" /></span>
		</td>
		<td  align="right">联系手机：</td>
		<td  >
		<span name="proposal/fzr_mobile"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile" /></span>
		</td>
		</security:authorize>
		<security:authorize ifAnyGranted="A_DAILU_PROPOSAL">
		<td  align="right"><span class="color_red">*</span>联系电话：</td>
		<td  >
		<input name="proposal/fzr_tel" label="项目负责人联系电话" type="text" required  class="input_css required"  onchange="synFzrMsg(1)"  maxlength="50"  value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work" />"/>
		</td>
		<td  align="right"><span class="color_red">*</span>联系手机：</td>
		<td  >
		<input name="proposal/fzr_mobile" label="项目负责人联系手机" type="text" onchange="synFzrMsg(1)" onfocus="InitInput.setNumber(this,11,0,0)"  maxlength="11"  class="input_css required mobile"   value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile" />"/>
		</td>
		</security:authorize>
		<td  align="right">电子邮箱：</td>
		<td  >
		<span name="proposal/fzr_mail"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email" /></span>
		</td>
	</tr>
</table>
<script type="text/javascript">
$(function(){
	cydw('org1');
	cydw('org2');
});

function cydw(id){
	var count =0 ;
	$("#"+id).find("input[type='text']").each(function(){
		if($.trim($(this).val()) != ''){
			count +=1;
		}
	});
	if(count != 0){
		$("#"+id).find("input[type='text']").each(function(){
			$(this).addClass("required");
		});
		$("#"+id).find("span[id^='color']").each(function(){
			$(this).css('display','');
		});
	}else{
		$("#"+id).find("input[type='text']").each(function(){
			$(this).removeClass("required");
	});
		$("#"+id).find("span[id^='color']").each(function(){
			$(this).css('display','none');
		});
	}
}

function initTreeValue2CallBack(){
	cydw('org1');
	cydw('org2');
}
function setEmptyValueForTree(id){
	$("#"+id).val("");
	$("#"+id+"_hideId").val("");
	$("#"+id+"_hideName").val("");
	$("#"+id+"_code").val("");
	$("#"+id+"_value").val("");
	$("#"+id+"_name").val("");
	$("#"+id + ",[name$='/"+id+"_code']" + ",[name$='/"+id+"_name'],[name$='/"+id+"_value']").val("");
	$("#sqdm").val("");
	cydw('org1');
	cydw('org2');
}



/**
 * 增加一行
 * @param tableId表格Id
 * @param radioId
 * @param nNewRowPosition
 * @param startRowIndex
 */
function addNewRowDeal(table)
{
	if(table.attr("id")=='tblPurchases'){
		var maxLinNum=table.find("tr[name='externTr']").length-2;;//获得行数，减去表头和隐藏行
		var lineNum=""+(maxLinNum+1);
		
		var addHtml=table.find("tr[name='externTr']")[1].innerHTML;//获得隐藏行的html,查找第二行
		addHtml=addHtml.replace(/\[index\]/g,lineNum);
		lineNum = (parseInt(lineNum, 10)-1).toString();//2011.12.13 行下标比行号小1(隐藏行下标[0]，第一行下标[00])
		if (lineNum.length==1)//如果是个位数，前面补0
			lineNum="0"+lineNum;
		addHtml=addHtml.replace(/\[0\]/g,"["+lineNum+"]");//替换html中行号
		addHtml=addHtml.replace(/\|/g,"/");//替换html中节点/的代替符"|"
		
		table.append("<tr name='externTr'>"+addHtml+"</tr>");//将html增加到最后
	}else{
		var maxLinNum=table.find("tr").length-2;;//获得行数，减去表头和隐藏行
		var lineNum=""+(maxLinNum+1);
		
		var addHtml=table.find("tr")[1].innerHTML;//获得隐藏行的html,查找第二行
		addHtml=addHtml.replace(/\[index\]/g,lineNum);
		lineNum = (parseInt(lineNum, 10)-1).toString();//2011.12.13 行下标比行号小1(隐藏行下标[0]，第一行下标[00])
		if (lineNum.length==1)//如果是个位数，前面补0
			lineNum="0"+lineNum;
		addHtml=addHtml.replace(/\[0\]/g,"["+lineNum+"]");//替换html中行号
		addHtml=addHtml.replace(/\|/g,"/");//替换html中节点/的代替符"|"
		
		table.append("<tr >"+addHtml+"</tr>");//将html增加到最后
	}
}
/**
 * 上移行
 * @param tblId
 * @returns {Boolean}
 */
function movePrev(tblId,selName) {

	if (!selName)
		selName = "";
	if ($("#" + tblId + " :radio[name*='" + selName + "']:checked").length == 0) {
		scmWarn(irisNotes.prevWarn);
		return false;
	}
	if ($("#" + tblId + " tr[name='externTr']").length <= 2)
		return false;
	var trChecked = $("#" + tblId + " :radio[name*='" + selName + "']:checked")
			.parents("tr").first();// 取得被选中的行
	var trPrev = trChecked.prev();// 取得上一行
	var index = trChecked.get(0).rowIndex;// 获得行号
	if (index <= 2) {// 如果是第一行
		scmWarn(irisNotes.tabelMoveWarn1);
		return false;
	}
	//trChecked.remove();
	trPrev.before(trChecked);
	trChecked.find(":radio[name*='" + selName + "']").attr("checked", 'true');
	refreshRowINdex(tblId);
}

/**
 * 下移行
 * @param tblId
 * @returns {Boolean}
 */
function moveNext(tblId,selName) {
	if (!selName)
		selName = "";
	if ($("#" + tblId + " :radio[name*='" + selName + "']:checked").length == 0) {
		scmWarn(irisNotes.nextWarn);
		return false;
	}
	if ($("#" + tblId + " tr[name='externTr']").length <= 2) {
		return false;
	}
	var trChecked = $("#" + tblId + " :radio[name*='" + selName + "']:checked")
			.parents("tr").first();// 取得被选中的行
	var trNext = trChecked.next();
	var index = trChecked.get(0).rowIndex;// 获得行号
	if (index == $("#" + tblId + " tr[name='externTr']").length - 1) {// 如果是第一行
		scmWarn(irisNotes.tabelMoveWarn2);
		return false;
	}
	//trChecked.remove();
	trNext.after(trChecked);
	trChecked.find(":radio[name*='" + selName + "']").attr("checked", "true");
	refreshRowINdex(tblId);
}
/**
 * 重新计算行号
 * @param tblId
 */
function refreshRowINdex(tblId){
	 //重新计算行号

	if(tblId=='tblPurchases'){
	  $("#"+tblId+" tr[name='externTr']").each(function(){
		  
		   var seq=$(this).get(0).rowIndex;//获得行数
		   if(seq>1){//如果有行  显示时display行不计入类，故只减1
			   
			   seq=seq-1;
			   var seq_no=$(this).find("[name$='seq_no']");
			   if(seq_no.is("span"))
				   seq_no.html(seq);
			   else
				   seq_no.val(seq);
			   
			   seq=""+(seq-1);
			   if(seq.length==1)
				   seq="0"+seq;
			  //替换相应的name参数的seq
			  $(this).find("input,span,textarea,select").each(function(){
				   var name=$(this).attr("name");
				   if(name!=null&&name!=""){
					   name=name.replace(/\[\d*\]/g,"["+seq+"]");
					   $(this).attr("name",name);
				   }
				   var id=$(this).attr("id");
				   if(id!=null&&id!=""){
					   id=id.replace(/\[\d*\]/g,"["+seq+"]");
					   $(this).attr("id",id);
				   }
				   var className=$(this).attr("class");
				   if(className!=null&&className!=""){
					   className=className.replace(/\[\d*\]/g,"["+seq+"]");
					   $(this).attr("class",className);
				   }
			   });
		   }
		 }
	  );
	}else{
		$("#"+tblId+" tr").each(function(){
			  
			   var seq=$(this).get(0).rowIndex;//获得行数
			   if(seq>1){//如果有行  显示时display行不计入类，故只减1
				   
				   seq=seq-1;
				   var seq_no=$(this).find("[name$='seq_no']");
				   if(seq_no.is("span"))
					   seq_no.html(seq);
				   else
					   seq_no.val(seq);
				   
				   seq=""+(seq-1);
				   if(seq.length==1)
					   seq="0"+seq;
				  //替换相应的name参数的seq
				  $(this).find("input,span,textarea,select").each(function(){
					   var name=$(this).attr("name");
					   if(name!=null&&name!=""){
						   name=name.replace(/\[\d*\]/g,"["+seq+"]");
						   $(this).attr("name",name);
					   }
					   var id=$(this).attr("id");
					   if(id!=null&&id!=""){
						   id=id.replace(/\[\d*\]/g,"["+seq+"]");
						   $(this).attr("id",id);
					   }
					   var className=$(this).attr("class");
					   if(className!=null&&className!=""){
						   className=className.replace(/\[\d*\]/g,"["+seq+"]");
						   $(this).attr("class",className);
					   }
				   });
			   }
			 }
		  );
	}
}

/**
 * 限制Table行数 
 * @param tableId表格id
 * @param max最大行数
 * @returns {Boolean}
 */
function checkTabLimit(tableId,max,message)
{
	 if(tableId=='tblPurchases'){
	var maxLinNum=$("#"+tableId+" tr[name='externTr']").length-2;
		if(maxLinNum>=max)
		{
			scmWarn(message);
			return false;
		}
	return true;
	 }else{
		 var maxLinNum=$("#"+tableId+" tr").length-2;
			
			if(maxLinNum>=max)
			{
				scmWarn(message);
				return false;
			}
		return true;
	 }
}
 
 /**
	 * 选择树设置隐藏域值 public.js中原函数不适用
	 */
	function initTreeValue(treeId, treeNode) {
		
		if (!(treeNode && treeNode.level > 0 || !treeNode.isParent) ) {
			scmWarn($("#" + treeId).attr("label")
					+ messageTip.researchAreaInvalidDisciplineCode);
			if (treeNode.level == 0) {
				$("#" + treeId).val("");
				$("#" + treeId).parents("td").find(
						"[name$='" + treeId + "_code'],[id$='" + treeId
								+ "_code']").val("");
				$("#" + treeId).parents("td").find(
						"[name$='" + treeId + "_name'],[id$='" + treeId
								+ "_name']").val("");
			}
			return false;
		}
		var oldval = $("#" + treeId).parents("td").find(
				"[name$='" + treeId + "_code'],[id$='" + treeId + "_code']")
				.val();
		var oldname = $("#" + treeId).parents("td").find(
				"[name$='" + treeId + "_name'],[id$='" + treeId + "_name']")
				.val();
		oldval = $.trim(oldval);
		oldname = $.trim(oldname);
		var str = treeNode.name;
		var obj = treeNode.parentNode;
		while (obj != null) {
			str = obj.name + "-" + str;
			obj = obj.parentNode;
		}
		if (treeId == 'impl_area') {

			if (treeNode.checked) {
				if (oldname != '')
					oldname += ',';
				if (oldval != '')
					oldval += ',';
				if(oldval.indexOf(treeNode.id)==-1)
					$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val(oldval + treeNode.id);
				if(oldname.indexOf(str)==-1){
					$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val(oldname + str);
					$("#" + treeId).parents("td").find("[name='" + treeId + "'],[id='" + treeId + "']").val(oldname + str);
				}
			} else {
				$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val(("," + oldval).replace(',' + treeNode.id, '').substring(1));
				$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val(("," + oldname).replace("," + str, '').substring(1));
				$("#" + treeId).parents("td").find("[name='" + treeId + "'],[id='" + treeId + "']").val(("," + oldname).replace("," + str, '').substring(1));
			}
		} else {
			$("#" + treeId).parents("td")
					.find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val(treeNode.id);
			$("#" + treeId).parents("td")
					.find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val(str);
		}

	}
</script>

